package com.example.vehicle.Function;

import cn.hutool.crypto.SmUtil;

import java.util.Scanner;

/**
 * @name: SM3
 * @description: SM3摘要类。
 * @author: Lulu Zhao
 **/
public class SM3 {
    static Scanner scanner = new Scanner(System.in);

    /**
     * @name: main
     * @description: 主函数。
     * @params: [args]
     * @return: void
     * @author: Lulu Zhao
     */
    public static void main(String[] args) {
        String previousHashedPassword = scanner.nextLine();
        int hashTimes = scanner.nextInt();
        for (int i = 0; i < hashTimes; i++) {
            previousHashedPassword = SmUtil.sm3(previousHashedPassword);
        }
        System.out.println(previousHashedPassword);
    }
}
